from collections import namedtuple

tuple1 = (11, 22)
print(type(tuple1))
print(tuple1)
print(tuple1[0])
print(tuple1[1])


class S:
    pass


s = S
print(s)

XiaoHong = namedtuple('XiaoHong', ['name', 'age'])

print(type(XiaoHong))
print(XiaoHong)

x = XiaoHong('xiaohong', 12)

print(x)
print(type(x))

print(isinstance(x, tuple))

print(x.name)
print(x.age)

print(x[0])
print(x[1])

# x.age = 1
print(x)

# Point = namedtuple('Point', ['x', 'y'])
# p = Point(22, 33)
#
# print(p[0])
# print(p[1])
# print(p.x)
# print(p.y)
#
# # p = tuple(22, 33)

